#ifndef OBJECT_H
#define OBJECT_H

#include "defines/objectType.h"
#include "color.h"
#include "vector3d.h"
#include <cmath>

class Object{
	public:
		Object(unsigned int = 0, Color = Color(1.0, 1.0, 1.0, 1.0), double = 0.1, double  = 0.5);
		~Object(){};

		virtual unsigned int getType() const = 0;

		unsigned int getID() const {return id;};

		bool isSelected() const {return selected;};
		void select(bool _b) {selected = _b;};

		const Color &getColor() const {return color;};
		void setColor(const Color &_c) {color = _c;};

		void setMiS(double _miS) {miS = _miS;};
		double getMiS() {return miS;};

		void setMiK(double _miK) {miK = _miK;};
		double getMiK() {return miK;};

		const double &getMi(const Vector3D &) const;

		virtual void draw(bool, bool) const = 0;
		virtual double intersection (const Vector3D&) const = 0;
		virtual Vector3D getNormalAt (const Vector3D&) const = 0;

//		static double toRad(double _x) {return (_x * M_PI)/180.0;};

	protected:
        unsigned int id;
        bool selected;
		Color color;
		double miS, miK;
};


#endif

